package cn.ekuma.odbo.mobile.room

import androidx.room.*

interface BaseDao<T> {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(itemList: List<T>): List<Long>

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(item: T): Long

    @Update
    fun update(item: T): Int

    @Delete
    fun delete(item: T)

    @Delete
    fun delete(itemList: List<T>)
}